<?php

require_once(WSB_MODULES_PATH . 'sherpa/models/DbTable/Highlight.php');

class Sherpa_HighlightsController extends WSB_Xtension_Extension
{

	/**
	 * @return string
	 */
	public function renderForBackend()
	{
		return get_class($this);
	}

	/**
	 * Index Action
	 */
	public function indexAction()
	{
		$table = new Sherpa_Model_DbTable_Highlight();
		$select = $table->select();
		$select->where('deleted=?', 0);
		$select->where('hidden=?', 0);
        $select->limit(3);
		$select->order('sorting ASC');
		$this->_view->models = $table->fetchAll($select);
		$this->addContent($this->_view->render('highlights/index.phtml'));
	}

}